import "./App.css";
import Bill from "./view/bill/bill";
import ReTotal from "./view/reTotal/reTotal";
import { useState } from "react";
function App() {
  let [currentClick, setcurrentClick] = useState(0);
  return (
    <div className="App">
      <div className="box">
        <div className="left">
          <div className="title">记账系统</div>
          <div className="content">
            <div className={`nav ${currentClick === 0 ? 'navActive' : ''}`} onClick={()=>{setcurrentClick(0)}}>账单</div>
            <div className={`nav ${currentClick === 1 ? 'navActive' : ''}`} onClick={()=>{setcurrentClick(1)}}>统计</div>
          </div>
        </div>
        <div className="right">
          {currentClick === 0 ? (
            <Bill className="child" />
          ) : (
            <ReTotal className="child" />
          )}
        </div>
      </div>
    </div>
  );
}

export default App;
